package com.effective;

import java.util.ArrayList;
import java.util.List;

public class Box<T> {
	
	private List<T> item;

	public List<T> getItem() {
		return item;
	}

	public void setItem(List<T> item) {
		this.item = item;
	}
	
	public void getSet(Box<?> box){
		//ERROR: The method setItem(List<capture#1-of ?>) in the type Box<capture#1-of ?> 
		//is not applicable for the arguments (List<capture#2-of ?>)
		//box.setItem(box.getItem());
		helper(box);
	}
	
	public <V> void helper(Box<V> box){
		box.setItem(box.getItem());
	}
}
